#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int frog (int n)
{
    int a = 1;
	int b = 2;
	int c = 0;
	if(n==1)
	{
	    return a;
	}
	else if(n==2)
	{
	    return b;
	}
	else
	{
	    while(n>=3)
		{
			c = a + b;
		    a = b;
			b = c;
			n--;
		}
		return c;
	}
}
int main ()
{
	int N = 0;
	int ret = 0;
	scanf("%d",&N);
	ret = frog(N);
	printf("%d",ret);
    return 0;
}